package demo6;

public class Demo2 {
    public static void main(String[] args) {
//        Singleton s1=new Singleton();
//        Singleton s2=new Singleton();
        Singleton s1=Singleton.getInstance();
        Singleton s2=Singleton.getInstance();
        System.out.println("s1"+s1);//s2demo6.Singleton@60e53b93
        System.out.println("s2"+s2);//s2demo6.Singleton@60e53b93
        Student st1=Student.getInstance();
        Student st2=Student.getInstance();
        System.out.println("st1"+st1);
        System.out.println("st2"+st2);
    }
}
